#! /usr/local/bin/ruby

class Canonizer
  def self.canonize(s)
    # Remove all characters which are neither
    # whitespace nor valid word characters
    # (letters and digits.)
    s.gsub(/_|[^\w\s]/, "").downcase
  end
end
